<div class="clearfix row-main" ng-controller="projectCtrl">

	<div class="doc-body row">
		<!-- 左侧栏菜单 -->
		<div class="doc-left">
		
			<div class="doc-head" >
			  <a href='javascript:void(0)'  class='btn btn-primary pull-left' style='margin-left:0;' ui-sref="home({date:'${.now}'})">返回</a>
			  <div class="doc-head-left text-left ">
			  		<span><a href="#" >${bean.name!}</a></span>
			  </div>
			  
			  <div class="doc-head-right text-left">
				<div class="dropdown">
				  <button class="btn" type="button" data-toggle="dropdown">项目<span class="caret"></span></button>
				  <ul class="dropdown-menu pull-right text-left">
				    <li><a href="#"></a></li>
				    <li><a href="#">导出</a></li>
				  </ul>
				</div>
			  </div>
			  
			</div>
			
			<div style="clear: both;"></div>
			<div class='div-line' ></div>
		
			<form method='get' class='form-inline form-search'>
				<div class="input-group search-row">
					<input type='text' class='form-control search-query' style="width:198px" placeholder='请输入搜索目录' /> 
						<input type='button' class='btn' id='menu_search' value='搜索' ng-click="init()" data-loading='稍候...' />
					<a href='javascript:void(0)'  class='btn' ng-click='init()'><i class="icon icon-refresh"></i></a>
				</div>
				<div style="clear: both;"></div>
			</form>
			
			<ul class="nav nav-list" style="margin-top:5px;">
			<#list beanList as item >
					<#if item.node = 1 && item.parent_id ==bean.id > 
					  	<li>
					  		<a href="#" title="${item.name!}" ui-sref=".doc({id:'${item.id!}'})" >
					  			<i class="icon-blank"></i>${item.name!}
					  		</a>
				  			<i class="icon icon-pencil" data-id="${item.id!}" ng-click="setName($event)" data-toggle="modal" data-target="#editProjectModal"></i>
					  	</li>
					<#elseif item.parent_id ==bean.id >
						<li>
						  	<a href="#" title="${item.name!}" ng-click="clickMenu($event)">
						  		<i class="icon-chevron-right"></i>${item.name!}
						  	</a>
					  		<i class="icon icon-pencil" data-id="${item.id!}" ng-click="setName($event)" data-toggle="modal" data-target="#editProjectModal"></i>
							<ul class="child">
								<#list beanList as item2 >
									<#if item2.node == 1 && item2.parent_id ==item.id > 
									  	<li>
									  		<a href="#" title="${item2.name!}" ui-sref=".doc({id:'${item2.id!}'})" >
									  			<i class="icon-blank"></i>${item2.name!}
									  		</a>
									  		<i class="icon icon-pencil" data-id="${item2.id!}" ng-click="setName($event)" data-toggle="modal" data-target="#editProjectModal"></i>
									  	</li>
									<#elseif item2.parent_id ==item.id > 
									  	<li>
										  	<a href="#" title="${item2.name!}" ng-click="clickMenu($event)">
										  		<i class="icon-chevron-right"></i>${item2.name!}
										  	</a>
									  		<i class="icon icon-pencil" data-id="${item2.id!}" ng-click="setName($event)" data-toggle="modal" data-target="#editProjectModal"></i>
											<ul class="child">
												<#list beanList as item3 >
													<#if item3.node == 1 && item3.parent_id ==item2.id> 
													  	<li>
													  		<a href="#" title="${item3.name!}" ui-sref=".doc({id:'${item3.id!}'})" >
													  			<i class="icon-blank"></i>${item3.name!}
													  		</a>
												  			<i class="icon icon-pencil" data-id="${item3.id!}" ng-click="setName($event)" data-toggle="modal" data-target="#editProjectModal"></i>
													  	</li>
													<#elseif item3.parent_id ==item2.id > 
													  	<li>
														  	<a href="#" title="${item3.name!}" ng-click="clickMenu($event)">
														  		<i class="icon-chevron-right"></i>${item3.name!}
														  	</a>
													  		<i class="icon icon-pencil" data-id="${item3.id!}" ng-click="setName($event)" data-toggle="modal" data-target="#editProjectModal"></i>
															<ul class="child">
																<#list beanList as item4 >
																	<#if item4.node == 1 && item4.parent_id ==item3.id> 
																		<li>
																			<a href="#" title="${item4.name!}" ui-sref=".doc({id:'${item4.id!}'})" >
																				<i class="icon-blank"></i>${item4.name!}
																			</a>
																			<i class="icon icon-pencil" data-id="${item4.id!}" ng-click="setName($event)" data-toggle="modal" data-target="#editProjectModal"></i>
																		</li>
																	<#elseif item4.parent_id ==item3.id >
																		<li>
																			<a href="#" title="${item4.name!}" ng-click="clickMenu($event)">
																				<i class="icon-chevron-right"></i>${item4.name!}
																			</a>
																			<i class="icon icon-pencil" data-id="${item4.id!}" ng-click="setName($event)" data-toggle="modal" data-target="#editProjectModal"></i>
																		</li>
																	</#if>
																</#list>
															</ul> 
														</li>
													</#if>
												</#list>
											</ul>
										</li>
									</#if>
								</#list>
							</ul> 
						</li>
					</#if>
			</#list>
			</ul>
			
			<!-- 新建栏 -->
			<div class="doc-left-newbar">
				<div><a href="#" ng-click="setName($event)" data-toggle="modal" data-target="#editProjectModal" ><i class="icon-folder-open"></i>新建目录</a></div>
			</div>
		</div>
		<i class="toggle-btn icon icon-double-angle-left" ng-click='toggleBtn($event)' ></i>
	    <div class="doc-right" ui-view=""/>
	</div>
	
	<!-- 模板对话框 -->
	<div class="modal fade" id="editProjectModal">
	  <div class="modal-dialog">
	    <div class="modal-content">
	      <div class="modal-header">
	        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
	        <h4 class="modal-title">编辑目录</h4>
	      </div>
	      <div class="modal-body">
	      
	      </div>
	      <div class="modal-footer">
	        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
	      </div>
	    </div>
	  </div>
	</div>
	
</div>
